home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
utils
/
lack.zoo
/
jump.s
< prev
next >
Wrap
Text File
|
1993-12-22
|
761b
|
34 lines
.globl _setjump
.globl _longjump
.text
_setjump: movw sr, d1
oriw #0x700, sr
movl sp@(4), a0 | lap *arg
lea a0@(8), a0 | regs
movml d1-d7/a2-a6, a0@
lea sp@(4), a1 | sp after rts
movl a1, a0@(-4) | arg->mystk
movl sp@, a0@(52) | pc after rts
movl usp, a1
movl a1, a0@(56)
movl _curapp, a1
movl a1@, a1 | curapp->istk
subql #4, a1 | let caller pop arg
movl a1, sp
movl a0@(52), a1 | pc
movq #0, d0
movw d1, sr
jmp a1@
_longjump: oriw #0x700, sr
movl sp@(4), a0
lea a0@(8), a0
movml a0@, d1-d7/a2-a6
movl a0@(-4), a1 | mystk
movl a1, sp
movl a0@(56), a1
movl a1, usp
movq #1, d0
movl a0@(52), a1
movw d1, sr
jmp a1@